<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/searchform.css">
<link rel="stylesheet" href="statics/css/BasicData/customercenter.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span>供应商中心</span>
           <%-- <div class="titleright" style="display: none">
                <button class="layui-btn layui-btn-sm" id="customerstatistics">客户统计</button>
                <button class="layui-btn layui-btn-sm" id="commonsettings">公共池设置</button>
            </div>--%>
            <div class="titleright">
                <%-- <button class="layui-btn layui-btn-sm" id="customerstatistics">统计</button>--%>
                <%-- <button class="layui-btn layui-btn-sm" id="commonsettings">公共池设置</button>--%>
                <button class="layui-btn layui-btn-sm" style="margin-right:1em;" lay-filter="customer2statistics"
                        lay-dropdown="{showBy: 'hover',align:'left', menus: [
<%--                        {txt: '供应商帐期详情', event:'s1'}--%>
                            {txt: '供应商账期详情', event:'s2'},
                            {txt: '供应商采购金额及出货金额统计', event:'s3'},
                        ]}">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d"></i>
                </button>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-tab layui-tab-card">
                        <ul class="layui-tab-title">
                            <li class="layui-this">供应商查询</li>
                            <li class="">联系人查询</li>
                           <%-- <li class=""  id="khpool">公共客户池</li>--%>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div id="customertoolbar">
                                    <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="new" id="new">新增</button>
                                    <button class="layui-btn layui-btn-sm" lay-event="uploadFile" id="uploadFile">上传文件</button>
                                    <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="delet" id="delet">删除</button>
                                    <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="shared" id="sharedZhu">共享</button>
                                    <button class="layui-btn layui-btn-sm layui-btn-danger" id="print" style="margin-left: 10px" lay-event="print">打印</button>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">类型</label>
                                        <div class="layui-input-inline">
                                            <div class="layui-input-inline" style="width: 240px">
                                                <div id="cucustomerstype2" class="xm-select-demo"></div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="layui-inline">
                                        <label class="layui-form-label">所属业务员</label>
                                        <div class="layui-input-inline" style="width: 200px">
                                            <div id="salesman" class="xm-select-demo"></div>
                                        </div>
                                    </div>

                                    <div class="layui-inline">
                                        <label class="layui-form-label">名称</label>
                                        <div class="layui-input-inline">
                                            <input class="text layui-input" type="text" name="cucustomers" id="cucustomers" autocomplete="off" placeholder="">
                                        </div>
                                    </div>

                                    <button class="layui-btn layui-btn-sm" lay-event="searchs" style="margin-left: 10px" id="searchs">搜索</button>
                                    <button class="layui-btn layui-btn-sm" lay-event="publicpool"  id="addpubpool" style="display: none" >加入公共池</button>
                                    <button class="layui-btn layui-btn-sm" lay-event="setUpSupplier" id="setUpSupplier">设置</button>
                                </div>
                                <table class="layui-table" id="customerselect" lay-filter="customertable"></table>
                            </div>
                            <div  class="layui-tab-item">
                                <table class="layui-table" id="contactselect" lay-filter="contacttable"></table>
                            </div>
                            <div class="layui-tab-item" id="khpooldiv" style="display: none">
                                <table class="layui-table" id="customerpoolselect" lay-filter="customerpooltable"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="layui-row" id="dicustomers" style="display:none;">
    <div class="layui-col-md10 associated-form">
        <form class="layui-form layui-from-pane" action="" style="margin-top:20px" id="dicustomers-formid" lay-filter="dicustomers-form">
            <div class="layui-form-item">
                <label class="layui-form-label">新客户业务员</label>
                <div class="layui-input-block" style=" margin-left: 120px;">
                    <select name="customersalesman" id="customersalesman" lay-verify="" lay-search></select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn  layui-btn-submit " lay-submit="" lay-filter="dicustomerssubmit" id="dicustomerssubmit">提交</button>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="layui-row" id="shared" style="display:none;">
    <div class="layui-col-md10 associated-form">
        <form class="layui-form layui-from-pane" action="" style="margin-top:20px" id="share-formid" lay-filter="share-form">
            <div class="layui-form-item">
                <label class="layui-form-label">业务员</label>
                <div class="layui-input-block" style=" margin-left: 120px;">
                    <div id="share" class="xm-select-demo"></div>
                   <%-- <select name="share" id="share" lay-verify="" lay-search></select>--%>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="text-align: center;padding-top: 50px;">
                    <button class="layui-btn  layui-btn-submit " lay-submit="" lay-filter="sharesubmit" id="sharesubmit">提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
<%--<script type="text/html" id="customertoolbar">
<div id="customertoolbar">
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="new">新增</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="delet">删除</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="shared">共享</button>




        <div class="layui-inline">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-inline">
                <div class="layui-input-inline" style="width: 240px">
                    <div id="cucustomerstype2" class="xm-select-demo"></div>
                </div>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">所属业务员</label>
            <div class="layui-input-inline" style="width: 200px">
                <div id="salesman" class="xm-select-demo"></div>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-inline">
                <input class="text layui-input" type="text" name="cucustomers" id="cucustomers" autocomplete="off" placeholder="">
            </div>
        </div>

        <button class="layui-btn layui-btn-sm" lay-event="searchs" style="margin-left: 10px">搜索</button>
       <button class="layui-btn layui-btn-sm" lay-event="publicpool"  id="addpubpool" style="display: none">加入公共池</button>
</div>
</script>--%>

<script type="text/html" id="customerup">
    {{# if (d.processid ===null){}}
    <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="customerup">修改</a>
    {{#}}}

    {{# if (d.status ==="B"){}}
    <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="cacleB">取消黑名单</a>
    {{#}}}
    {{# if (d.status !="B"){}}
    <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="addB">加入黑名单</a>
    {{#}}}


    {{# if (isMsn =="是"){}}
        {{# if (d.tempStatus =="待批箱"){}}
        <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="through">审批通过</a>
        <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="backtothe">审批退回</a>
        {{#}}}
    {{#}}}

    {{# if (isMsn =="否"){}}
        {{# if (d.tempStatus =="待批箱"){}}
            <cite>审批中</cite>
        {{#}}}
    {{#}}}


    {{# if (d.tempStatus =="草稿箱"){}}
    <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="submits">提交审批</a>
    {{#}}}

</script>

<script type="text/html" id="contactquerytoolbar">
    <div class="layui-inline">
        <label class="layui-form-label">联系人信息</label>
        <div class="layui-input-inline">
            <input class="text layui-input" type="text" name="contactinfo" id="contactinfo" autocomplete="off" placeholder="">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-inline">
            <input class="text layui-input" type="text" name="contactemail" id="contactemail" autocomplete="off" placeholder="">
        </div>
    </div>
    <button class="layui-btn layui-btn-sm" lay-event="searchs" style="margin-left: 10px">搜索</button>
</script>

<script type="text/html" id="commonclienttoolbar">

        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="setcustomer">设为自己的客户</button>
        <button class="layui-btn layui-btn-sm"  lay-event="dicustomers">分配客户</button>
        <div class="layui-inline">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-inline">

                <select name="cocustomerstype2" id="cocustomerstype2">

                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">信息</label>
            <div class="layui-input-inline">
                <input class="text layui-input" type="text" name="cocustomersinfo" id="cocustomersinfo" autocomplete="off" placeholder="">
            </div>
        </div>
        <button class="layui-btn layui-btn-sm" lay-event="searchs" style="margin-left: 10px">搜索</button>

</script>
<%@ include file="../tpl/foot.jsp"%>
<script src="statics/js/BasicData/customercenter2.js"></script>